# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=findnewest
pkgver=0.3
pkgrel=3
pkgdesc='Recursively find newest file in a hierarchy and print its timestamp'
url='https://github.com/0-wiz-0/findnewest'
arch=('loong64' 'x86_64')
license=('BSD')
depends=('glibc')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/0-wiz-0/findnewest/archive/findnewest-${pkgver}.tar.gz)
sha512sums=('57a1dabe02ba6fe7fa89381fe2beba6c0ee7b7cbdf01898f155e3876f12ffabaa7b1e04356b0aa4edb72c9950f24b37fe259e9b93451f1e234e87ef5bc67ec3c')

prepare() {
  cd ${pkgname}-${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${pkgname}-${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim: ts=2 sw=2 et:
